new Vue({
    el: '#app',
    data(){
        return {
            form:{}
        }
    },
    mixins:[main],
    mounted() {
        const Page_SerialNumber = sessionStorage.getItem('Page_SerialNumber');
        this.getData(Page_SerialNumber);
    },
    methods: {
        getData(Page_SerialNumber){//获取当前组件数据
            const that = this;
            $.ajax({
                headers:requestHeaders(),
                type: 'POST',
                url: `${BASE_URL2}/generalBusiness/generalQueryByTableNameWithOriginal`,
                data: { 
                    Data: "base_page_info" ,
                    Condition: "Page_SerialNumber='" + Page_SerialNumber + "'"
                },
                success: function (data) {
                    if (data.length == 1) {
                        that.form = data[0];
                        that.instantiate = JSON.parse(that.form.Path_JSON);
                        that.background =  JSON.parse(that.form.Background_JSON);
                        that.$store.commit('setSelecteComponent', that.instantiate[that.instantiate.length-1])
                    }
                },
                complete: function (XMLHttpRequest) {
                    requestPretreatment(XMLHttpRequest);
                },
                dataType: "json"
            });
        },
    }
})